import tkinter


def create_main_view():
    window = tkinter.Tk()

    window.title('本地文件管理')

    # 设置窗口大小
    width = 780
    height = 600
    # 获取屏幕尺寸以计算布局参数，使窗口居屏幕中央
    screenwidth = window.winfo_screenwidth()
    screenheight = window.winfo_screenheight()
    alignstr = '%dx%d+%d+%d' % (width, height, (screenwidth - width) / 2, (screenheight - height) / 2)
    window.geometry(alignstr)
    # 设置窗口是否可变长、宽，True：可变，False：不可变
    window.resizable(width=True, height=True)
    return window

